package com.ScoresSystem.mapper;

import com.ScoresSystem.pojo.Score;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ScoreMapper {
    
    List<Score> getAllScore(@Param("studentName") String name, @Param("pageIndex") int pageIndex, @Param("pageSize") Integer pageSize);

    int getCount(String name);

    Score findScoreByStudentNoAndSubjectId(@Param("studentNo") Integer studentNo, @Param("subjectId") Integer subjectId);

    int addScore(Score score);

    int updateScore(Score score);

    int deleteScore(Integer id);

    List<Score> getScoreAccount();

    // 获取当前学生的成绩
    List<Score> getMyScore(@Param("studentNo") String studentNo, @Param("pageIndex") int pageIndex, @Param("pageSize") Integer pageSize);

    // 获取当前学生的成绩数量
    int getMyScoreCount(@Param("studentNo") String studentNo);

    List<Score> getMyScoreAccount(String studentNo);
}
